package com.future.bantang.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.future.bantang.R;
import com.future.bantang.adapter.SearchActFraPagerAdapter;
import com.future.bantang.view.PagerSlidingTabStrip;
import com.lidroid.xutils.view.annotation.ViewInject;

/**
 * Created by zzh on 2016/1/18.
 * 搜索分类 --一个滑动指示器，一个viewPager,显示单品和清单
 */
public class SearchCategoryFragment extends BaseFragment{

    @ViewInject(R.id.tabs_act_search_strip)
    private PagerSlidingTabStrip tabs;

    @ViewInject(R.id.pager_act_search_content)
    private ViewPager pager;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_search_category,null,false);
    }

    @Override
    protected void initView(View view) {
        super.initView(view);
        SearchActFraPagerAdapter adapter=new SearchActFraPagerAdapter(getActivity().getSupportFragmentManager());
        pager.setAdapter(adapter);
        tabs.setViewPager(pager);
    }

    @Override
    protected void loadDatas() {
        super.loadDatas();

    }
}
